<?php
/**
 * Created by PhpStorm.
 * User: chenzhitao
 * Date: 2018/5/8
 * Time: 下午3:31
 */

namespace App\Busi\Traits;


use App\Models\CompanyCase;

Trait CompanyCaseTrait
{
    public function getCaseByIdAndCompanyId($id,$company_id){
        $where = [
            ['id','=',$id],
            ['company_id','=',$company_id],
        ];

        $data = CompanyCase::where($where)->first();
        return $data;
    }
    function getCompanyCaseByUid($uid)
    {
        $company = Company::where('uid', $uid)->first();
        return $company;
    }
}